
<script type="text/javascript">

	window.onerror = function() { return true; }
	window.onload = doLoad;

	function doLoad() {
		frmLogin.username.focus()
	}

	function CheckForgotPass()
	{
		var f = document.frmForgotPass;

		if (f.username.value == '')
		{
			alert('%%LNG_NoUsername%%');
			f.username.focus();
			f.username.select();
			return false;
		}

		if (f.password.value == "")
		{
			alert("%%LNG_UserNoPass%%");
			f.password.focus();
			f.password.select();
			return false;
		}

		if(f.password.value.length < 5)
		{
			alert("%%LNG_UserShortPass%%");
			f.password.focus();
			f.password.select();
			return false;
		}

		if(f.password.value != f.password1.value)
		{
			alert("%%LNG_UserMismatchPass%%");
			f.password.focus();
			f.password.select();
			return false;
		}
		
		// Everything is OK
		return true;
	}

</script>

<form action="index.php?ToDo=resetPassword" method="post" name="frmForgotPass" onSubmit="return CheckForgotPass()">
	<input type="hidden" name="userid" value="%%GLOBAL_UserId%%">
	<input type="hidden" name="code" value="%%GLOBAL_Code%%">

	<div id="box">
		<table><tr><td style="border:solid 2px #DDD; padding:17px; background-color:#FFF; width:330px;">
		<table>
		  <tr>
			<td class="Heading1">
				<!-- Removing or editing this Image Tag will violate your license agreement with Interspire -->
				<img src="index.php?ToDo=drawLogo"  alt="%%LNG_CompanyLogoText%%" />
			</td>
		  </tr>
		  <tr>
			<td style="padding:0px 0px 5px 2px">%%GLOBAL_Message%%</td>
		  </tr>
		  <tr>
			<td style="padding:0px 0px 5px 2px">%%LNG_ForgotPassResetIntro%%</td>
		  </tr>
		  <tr>
			<td>
				<table>
				<tr>
				  <td nowrap="nowrap" style="padding:0px 10px 0px 10px">%%LNG_UsernameLabel%%</td>
				  <td>
					<input readonly type="text" name="username" id="username" class="Field150" value="%%GLOBAL_Username%%">
				  </td>
				</tr>

				<tr>
				  <td nowrap="nowrap" style="padding:0px 10px 0px 10px">%%LNG_NewPasswordLabel%%</td>
				  <td>
					<input type="password" name="password" class="Field150" value="">
				  </td>
				</tr>

				<tr>
				  <td nowrap="nowrap" style="padding:0px 10px 0px 10px">%%LNG_UserPassConfirm%%</td>
				  <td>
					<input type="password" name="password1" class="Field150" value="">
				  </td>
				</tr>
				  <tr>
					<td>&nbsp;</td>
					<td>
					  <input type="submit" name="SubmitButton" value="%%LNG_Login%%" class="FormButton">
					</td>
				  </tr>
				  <tr><td class="Gap"></td></tr>
			  </table>
			</td>
		  </tr>
		</table>
		</td></tr>
		<tr>
			<td>
				<div class="PageFooter" style="padding: 10px 10px 10px 0px; margin-bottom: 20px; text-align: center;">
					<!-- Removing or editing this "Powered by" link will violate your license agreement with Interspire -->
					%%LNG_PagePoweredByShort%%
				</div>
			</td>
		</tr>

		</table>
	</div>
</form>

<script type="text/javascript">
	function CheckForgotPass()
	{
		var f = document.frmForgotPass;

		if (f.password.value == "")
		{
			alert("%%LNG_UserNoPass%%");
			f.password.focus();
			f.password.select();
			return false;
		}

		if(f.password.value.length < 5)
		{
			alert("%%LNG_UserShortPass%%");
			f.password.focus();
			f.password.select();
			return false;
		}

		if(f.password.value != f.password1.value)
		{
			alert("%%LNG_UserMismatchPass%%");
			f.password.focus();
			f.password.select();
			return false;
		}
		
		// Everything is OK
		return true;
	}

</script>